﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.Common;
using System.Data;

namespace DataTier.Connection
{
    /// <summary>
    /// Отвечает за создание соединений с БД
    /// </summary>
    public class ConnectionFactory : IConnectionFactory
    {
        public DbConnection CreateConnection()
        {
            var connection = new DBModelContainer().Connection;
            return connection;
        }

        #region IConnectionFactory Members

        IDbConnection IConnectionFactory.CreateConnection()
        {
            return CreateConnection();
        }

        #endregion
    }
}
